#include<bits/stdc++.h>
using namespace std;

int main () {
    int n;
    cin >> n;
    int j = 0, o = 0;
    for (int _ = 1; _ <= n; _++) {
        int temp;
        cin >> temp;
        if (temp % 2) j++;
        else o++;
    }
    cout << j << " " << o << endl;
    return 0;
}